using UnityEngine;
using System.Collections;

public class destroyBullet : MonoBehaviour {

	public GameObject me;
	
	
	// Use this for initialization
	void Start () {
	
	
	}
	
	// Update is called once per frame
	void Update () {
		
				
	
	}
	
	void OnTriggerEnter(Collider collider)
	{
		
		if(collider.gameObject.tag == "bala")
		{
			Destroy(collider.gameObject); //DESTROY A BALA QND COLIDE COM O INIMIGO.
			
			Debug.Log("destruindo bala");
			Destroy(me.gameObject);
		}		
			
			
		}			
		
	
}
